/**
 * Driver functions for the DMA device
 *
 * Copyright 2010 Delft University of Technology
 */

#ifndef __OS_DMA_H__
#define __OS_DMA_H__

typedef struct DMA_s DMA;

/**
 * DMA descriptor
 */
struct DMA_s{
	int id;
	void * base_addr;
};

/*
 * test if DMA is busy
 */
int hw_dma_busy(DMA * dma);

/*
 * move data of size 'block_size' using 'dma' from 'src' to 'dst'
 */
void hw_dma_receive(void * dst, void * src, int block_size, DMA * dma);

/*
 * move data of size 'block_size' using 'dma' from 'src' to 'dst'
 */
void hw_dma_send(void * dst, void * src, int block_size, DMA * dma);

#endif
